<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
	$(function(){
		$("#intoAlbumFormBtn").click(function(){
			/* var m=$("#mId").val();
			var w=$("#wId").val();
			var password=$("#rePassword").val(); */
			var form = $("#intoAlbumForm").serialize();
			$.ajax({
				type:"POST",
				url:"${initParam.root}/happy.do",
				data:form,
				dataType:"json",
				success:function(data){
					if(data.osvo!=null){
						//alert(data.osvo.optionalNo);
						var opNo=data.osvo.optionalNo;
						alert("입장");
						self.close();
						opener.location.href="${initParam.root}/album.do?command=HappyTimeAlbumList&optionalNoTest="+opNo+"&page=1";
					}else{
				 		alert("비밀번호가 틀립니다.");
				 		$("#rePassword").val("");
				 		$("#rePassword").focus();
					}
				}
			});
		});
	});
</script>
</head>
<body background="${initParam.root }/img/heart.jpg">
<form name="intoAlbumForm" id="intoAlbumForm">
<input type="hidden" name="command" value="intoAlbum">
<font size=2><b>신랑 아이디 :  ${param.mId}</b></font>
<input type="hidden" name="mId" id="mId" value="${param.mId}">
<br>
<font size=2><b>신부 아이디 : ${param.wId}</b></font>
<input type="hidden" name="wId" id="wId" value="${param.wId}">
<br><br>
<font size=2 color="red"><b>패스워드</b></font><input type="password" name="rePassword" id="rePassword" size="10">
<input type="button" id="intoAlbumFormBtn" value="확인">
</form>
</body>
</html>